<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <body>

        <ui:composition template="./potentialCustomers.xhtml">

            <ui:define name="tabContent">
                <h:form>
                    <p:panel>

                        <table border="0" cellspacing="5">
                            <tbody>
                                <tr>
                                    <td style="vertical-align: top">
                                        <h:panelGrid columns="2">

                                            Ngày bắt đầu*
                                            <p:calendar value="#{tblRawMoBean.startDate}" pattern="dd/MM/yyyy" timeZone="Asia/Saigon" navigator="true"
                                                        required="true" requiredMessage="Bạn chưa điền ngày bắt đầu"/>
                                            Ngày kết thúc*
                                            <p:calendar value="#{tblRawMoBean.endDate}" pattern="dd/MM/yyyy" timeZone="Asia/Saigon" navigator="true"
                                                        required="true" requiredMessage="Bạn chưa điền ngày kết thúc"/>

                                            Thời điểm trong ngày*

                                            <h:panelGrid>
                                                Từ <p:inputMask id="dailyStartTime" value="#{tblRawMoBean.dailyStartTime}" mask="99:99:99"/>
                                                đến <p:inputMask id="dailyEndTime" value="#{tblRawMoBean.dailyEndTime}" mask="99:99:99"/>
                                            </h:panelGrid>

                                            Service Code
                                            <h:selectManyMenu value="#{tblRawMoBean.selectedServiceCodes}" style="width: 150px; height: 65px">
                                                <f:selectItem itemLabel="MB" itemValue="MB"/>
                                                <f:selectItem itemLabel="MN" itemValue="MN"/>
                                                <f:selectItem itemLabel="MT" itemValue="MT"/>
                                                <f:selectItem itemLabel="MT" itemValue="FB"/>
                                            </h:selectManyMenu>

                                            Mạng
                                            <h:selectManyMenu value="#{tblRawMoBean.selectedOperators}" style="width: 150px; height: 65px">
                                                <f:selectItem itemLabel="Viettel" itemValue="VT"/>
                                                <f:selectItem itemLabel="Mobifone" itemValue="VMS"/>
                                                <f:selectItem itemLabel="Vinaphone" itemValue="VNP"/>
                                            </h:selectManyMenu>

                                            <h:outputText/>
                                            <p:commandButton value="Tìm kiếm" action="#{tblRawMoBean.findRawMo()}" oncomplete="processingDialog.hide()"
                                                             onclick="processingDialog.show()" ajax="false"/>


                                        </h:panelGrid>
                                    </td>

                                    <td style="vertical-align: top">
                                        <h:form id="tblRawMoTableForm">
                                            <h:outputText rendered="#{tblRawMoBean.list.size() > 0}" value="Tổng: #{tblRawMoBean.list.size()} thuê bao"/>
                                            <p:inputTextarea value="#{tblRawMoBean.listStr}" readonly="true" autoResize="true" rendered="#{tblRawMoBean.list.size() > 0}"/>
                                        </h:form>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </p:panel>
                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
